home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
OOP_Course
/
Labs
/
Stack
/
Stack.m
< prev
next >
Wrap
Text File
|
1992-12-19
|
591b
|
40 lines
/*Objective_C Implementation of the Stack Class: Stack.m*/
//EXERCISE: COMPLETE THE PUSH, POP, TOP, AND PRINTSTACK METHODS
#import <stdio.h>
#import "Stack.h"
@implementation Stack
//Initialize a Stack instance of floating point elements
-init
{
return [self initCount:0 elementSize:sizeof(float) description:"f"];
//return id of newly created Stack instance
}
//Add an element to the stack
-push: (float)aNumber
{
}
//Remove an element from the stack
-(float)pop
{
}
-(float)top
{
}
//Print the elements on the stack
-printStack
{
}
@end